﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 发布日志
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("发布日志")]
	[BindTable("DeployLog", Description = "发布日志", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class DeployLog
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private Int32 _JobID;
		/// <summary>
		/// 工作编号
		/// </summary>
		[Description("工作编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "JobID", "工作编号", "", "int", 10, 0, false)]
		public Int32 JobID
		{
			get { return _JobID; }
			set { if (OnPropertyChange("JobID", value)) _JobID = value; }
		}

		private String _Message;
		/// <summary>
		/// 消息
		/// </summary>
		[Description("消息")]
		[DataObjectField(false, false, true, 500)]
		[BindColumn(4, "Message", "消息", "", "nvarchar(500)", 0, 0, true)]
		public String Message
		{
			get { return _Message; }
			set { if (OnPropertyChange("Message", value)) _Message = value; }
		}

		private String _Memo;
		/// <summary>
		/// 注释
		/// </summary>
		[Description("注释")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(5, "Memo", "注释", "", "nvarchar(200)", 0, 0, true)]
		public String Memo
		{
			get { return _Memo; }
			set { if (OnPropertyChange("Memo", value)) _Memo = value; }
		}

		private DateTime _BeginTime;
		/// <summary>
		/// 开始时间
		/// </summary>
		[Description("开始时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(6, "BeginTime", "开始时间", "", "datetime2", 7, 0, false)]
		public DateTime BeginTime
		{
			get { return _BeginTime; }
			set { if (OnPropertyChange("BeginTime", value)) _BeginTime = value; }
		}

		private DateTime _EndTime;
		/// <summary>
		/// 结束时间
		/// </summary>
		[Description("结束时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(7, "EndTime", "结束时间", "", "datetime2", 7, 0, false)]
		public DateTime EndTime
		{
			get { return _EndTime; }
			set { if (OnPropertyChange("EndTime", value)) _EndTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(8, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(9, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(10, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(11, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "SiteID" : return _SiteID;
					case "JobID" : return _JobID;
					case "Message" : return _Message;
					case "Memo" : return _Memo;
					case "BeginTime" : return _BeginTime;
					case "EndTime" : return _EndTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "JobID" : _JobID = Convert.ToInt32(value); break;
					case "Message" : _Message = Convert.ToString(value); break;
					case "Memo" : _Memo = Convert.ToString(value); break;
					case "BeginTime" : _BeginTime = Convert.ToDateTime(value); break;
					case "EndTime" : _EndTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得发布日志字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 工作编号
			///</summary>
			public const String JobID = "JobID";

			///<summary>
			/// 消息
			///</summary>
			public const String Message = "Message";

			///<summary>
			/// 注释
			///</summary>
			public const String Memo = "Memo";

			///<summary>
			/// 开始时间
			///</summary>
			public const String BeginTime = "BeginTime";

			///<summary>
			/// 结束时间
			///</summary>
			public const String EndTime = "EndTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}